<div class="container-fluid">
  <div class="row">
    <div class="col-sm-12">
      <div class="panel panel-primary filterable table_border">
        <div class="panel-heading table_new">
          <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#accordion"
               href="#collapseStudentList">
              <%= @course.name %> 选课名单
            </a>
          </h4>
        </div>
        <div id="collapseStudentList" class="panel-collapse collapse in">
          <div class="panel-body">

            <div class="row">
              <div class="col-sm-12" style="padding-bottom: 26px;">
               <%= link_to "导出", grades_export_url(:course_id =>@course.id,:format => 'xls'),:class =>"btn btn-info btn_new"%>
              </div>
            </div>

            <div class="table-responsive">
              <table class="table table-striped table-hover">
                <thead>
                <tr>
                  <th>学号</th>
                  <th>名字</th>
                  <th>专业</th>
                  <th>培养单位</th>
                  <th>电子邮件</th>
                </tr>
                </thead>
                <tbody>

                <% @user.each do |user| %>
                    <tr>
                      <td><%= user.num %></td>
                      <td><%= user.name %></td>
                      <td><%= user.major %></td>
                      <td><%= user.department %></td>
                      <td><%= user.email %></td>
                    </tr>
                <% end %>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>